package org.activiti.DelegateTasks;

/**
 * Created with IntelliJ IDEA.
 * UserEntity: simnau
 * Date: 13.2.11
 * Time: 11.56
 * To change this template use File | Settings | File Templates.
 */
public enum Case {
    GENITIVE("genitive"),           //Kilmininkas
    ACCUSATIVE("accusative"),       //Galininkas
    DATIVE("dative"),               //Naudininkas
    INSTRUMENTAL("instrumental");   //Įnagininkas

    private final String wordCase;

    Case(String wordCase){
        this.wordCase = wordCase;
    }

    public static Case caseForName(String name){
        if (name != null){
            for(Case wordCase : Case.values()){
                if(name.equalsIgnoreCase(wordCase.wordCase)){
                    return wordCase;
                }
            }
        }
        return null;
    }

}
